package cn.smbms.biz.impl;

import java.util.List;

import cn.smbms.biz.BillBiz;
import cn.smbms.dao.BillMapper;
import cn.smbms.entity.Bill;

public class BillBizImpl implements BillBiz {
	private BillMapper billMapper;
	
	
	public void setBillMapper(BillMapper billMapper) {
		this.billMapper = billMapper;
	}

	@Override
	public int add(Bill bill) throws Exception {
		
		return billMapper.add(bill);
	}

	@Override
	public List<Bill> getBillList(Bill bill) throws Exception {
		try {
			return billMapper.getBillList(bill);
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
		
	}

	@Override
	public int deleteBillById(Integer delId) throws Exception {
		return billMapper.deleteBillById(delId);
	}

	@Override
	public Bill getBillById(Integer id) throws Exception {
		return billMapper.getBillById(id);
	}

	@Override
	public int modify(Bill bill) throws Exception {
		return billMapper.modify(bill);
	}

	@Override
	public int getBillCountByProviderId(Integer providerId) throws Exception {
		
		return billMapper.getBillCountByProviderId(providerId);
	}

}
